#ifndef __XKK_INETADDRESS_H__
#define __XKK_INETADDRESS_H__

#include <arpa/inet.h>
#include <string>

using std::string;

namespace xkk
{

class InetAddress
{
public:
    explicit
    InetAddress(unsigned short port); 
    InetAddress(const string &ip,unsigned short port); 
    InetAddress(const struct sockaddr_in& addr); 

    string ip() const;
    unsigned short port() const;
    struct sockaddr_in * getInetAddressPtr();
    ~InetAddress() {}

private:
    struct sockaddr_in _addr;
};

}
#endif
